package com.csun.cmny.provider.service;

import com.csun.cmny.base.dto.LoginAuthDto;
import com.csun.cmny.core.support.IService;
import com.csun.cmny.provider.model.domain.DmcCsunSleepBind;
import com.csun.cmny.provider.model.dto.csunsleep.BindCsunSleepDto;
import com.csun.cmny.provider.model.dto.csunsleep.CsunSleepPageQuery;
import com.csun.cmny.provider.model.dto.propertyManagement.ProperManagementDeviceDataDto;
import com.csun.cmny.provider.model.dto.propertyManagement.SelectDeviceDataDto;
import com.csun.cmny.provider.model.dto.propertyManagement.SelectSleepDataDto;
import com.csun.cmny.provider.model.dto.sleep.BedOldmanSleepReqDto;
import com.csun.cmny.provider.model.vo.CsunSleepDataReqVo;
import com.csun.cmny.provider.model.vo.OldmanBedRoomBuildingVo;
import com.csun.cmny.provider.model.vo.csunsleep.CsunSleepVo;
import com.csun.cmny.provider.model.vo.csunsleep.DmcCsunSleepVo;
import com.csun.cmny.provider.model.vo.life.DmcDeviceByRoom;
import com.csun.cmny.provider.model.vo.propertyManagement.PropertyDataVo;
import com.csun.cmny.provider.model.vo.propertyManagement.SleepDataVo;
import com.github.pagehelper.PageInfo;

import java.util.List;
import java.util.Map;

/**
 * @Auther: chisj chisj@foxmal.com
 * @Date: 2019-02-13 15:06
 * @Description: the interface dmc csun sleep bind service
 */
public interface DmcCsunSleepBindService extends IService<DmcCsunSleepBind> {

    /**
     * query group csun sleep list with page
     *
     * @param csunSleepPageQuery    csun sleep page query
     *
     * @return  the page info.
     */
    PageInfo queryGroupCsunSleepListWithPage(CsunSleepPageQuery csunSleepPageQuery);

    /**
     * bind csun sleep
     *
     * @param bindCsunSleepDto  bind csun sleep dto
     * @param loginAuthDto      login auth dto
     *
     * @return  the int.
     */
    Integer bindCsunSleep(BindCsunSleepDto bindCsunSleepDto, LoginAuthDto loginAuthDto);

    /**
     * break csun sleep
     *
     * @param deviceId  device id
     *
     * @return  the int.
     */
    Integer breakCsunSleep(Long deviceId);

    /**
     * query csun sleep bind list all
     *
     * @return  the list
     */
    List<DmcCsunSleepVo> queryCsunSleepBindListAll();

    /**
     * get csun sleep bind by device id
     *
     * @param deviceId  device id
     *
     * @return  dmc csun sleep vo
     */
    DmcCsunSleepVo getCsunSleepBindByDeviceId(Long deviceId);

    /**
     * get csun sleep bind by device no
     *
     * @param deviceNo  device no
     *
     * @return dmc csun sleep vo
     */
    DmcCsunSleepVo getCsunSleepBindByDeviceNo(String deviceNo);

    /**
     * get csun sleep bind by oldman id
     *
     * @param oldmanId  oldman id
     *
     * @return  dmc csun sleep vo
     */
    DmcCsunSleepVo getCsunSleepBindByOldmanId(Integer oldmanId);

    /**
     * delete csun sleep by id
     *
     * @param id    id
     *
     * @return  the int.
     */
    Integer deleteCsunSleepById(Long id);

    /**
     * @description: TODO
     * @param: oldmanId 老人ID
     * @return:
     * @throws
     * @author huangxm
     * @date 2019/3/15 13:39
     */
    Map<String,Object> getRecentData(Integer oldmanId);

    /**
     * query csun sleep data by ded oldman list
     *
     * @param bedOldmanSleepReqDtoList  bed oldman sleep req dto list
     *
     * @return  the list
     */
    List<CsunSleepDataReqVo> queryCsunSleepDataByBedOldmanList(List<BedOldmanSleepReqDto> bedOldmanSleepReqDtoList);

    /**
     * get oldman bed room building vo
     *
     * @param dmcCsunSleepVo    dmc csun sleep vo
     *
     * @return  oldman bed room building vo
     */
    OldmanBedRoomBuildingVo getOldmanBedRoomBuildingVo(DmcCsunSleepVo dmcCsunSleepVo);

    /**
     *
     * @param alertId
     * @return
     */
    DmcDeviceByRoom selectRoomIdByDeviceId(Long alertId);

    List<SleepDataVo> selectCunuSleepData(SelectSleepDataDto selectSleepDataDto);

    List<PropertyDataVo> selectDeviceData(SelectDeviceDataDto selectDeviceDataDto);

    List<DmcCsunSleepVo> queryGroupCsunSleepList(CsunSleepVo csunSleepPageQuery);
}
